package com.seari.Utils;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

public class DateUtils
{
	public static int getDaysOfMonth(String date) {
		SimpleDateFormat sdf = new SimpleDateFormat("yy-MM");
		
		Date parse = null;
		try
		{
			parse = sdf.parse(date);
		} catch (ParseException e)
		{
			e.printStackTrace();
		}
		Calendar calendar = Calendar.getInstance();
		calendar.setTime(parse);
		return calendar.getActualMaximum(Calendar.DAY_OF_MONTH);
	}
	
	public static void main(String[] args) throws ParseException  {
		System.out.println(getDaysOfMonth("19-1"));
	}

}
